-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Refactor: Removed GraphQL Prefixes #1257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: Removed GraphQL Prefixes #1257
Conversation
Hey, I have few queries:
|
Hi!
Btw, thanks a lot for working on this! |
Hey! Hasura's So, I think It is best to stop supporting the prefix entirely. Because, If we want to support both versions, there are some complex ways to achieve it like maintaining two hasura instances or setting up a gateway/proxy to translate the old queries to new one. I think removing the prefix entirely is the most simple and feasible solution. What are your thoughts on this?? |
I have another query regarding how a "v2 to v3" API transition will affect our database tables. Would it involve renaming all existing tables, for example, from If we rename all existing tables, we need to also reconfigure our hasura. |
Honesty @PraaneshSelvaraj I don't think we will ever have a v3 version of the API. No one has the time/will to work on it. I was actually thinking that maybe in future we could use the GraphQL endpoint as v3. We could just change the logic of how pokemons, species, varieties, forms are mapped into files, and in postgres and then offer the Hasura GQL on top of that data. Without writing Django code. That will shave off some work. |
And I thought about dropping support for the pokemon_v2_* prefix, I'd actually like to support both for a limited time. I can set up another machine with another endpoint, maybe https://beta.pokeapi.co/graphql/v1beta2. So I'm ok duplicating the code or the entire folder for the time being. |
Hey @Naramsim, If we want to support both for limited time, we can do it by
Personally, I think Option 1 makes more sense if this is only temporary. We can notify clients and encourage them to switch to the new version over time. So, What should we do now or do you have a different strategy in mind? |
table: | ||
name: pokemon_v2_typename | ||
schema: public | ||
- name: pokemonV2PokemonevolutionsByPartyTypeId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi I spun up another GQL server and tested your branch. Thanks for the amazing work!
Some questions:
- can we use the indentation provided by Hasura when
make hasura-export
? - This pokemonV2 prefix as well should be stripped away?
- Can you track the
typesprites
table?
For now let's override the /graphql
folder, just to see a clear diff. When ready I think I'll ask you to have two folders: /graphql/v1beta and /graphql/v1beta2
But this looks promising!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I will take a look on these.
49f0395
to
8e92c7b
Compare
Hey @Naramsim, I updated the branch with these changes:
I have also force-pushed this branch to clean up the commit history. Please check it out when you get a chance. |
Hi! @PraaneshSelvaraj @phalt , could you try play a bit here with the prefix stripped? PS: amazing work @PraaneshSelvaraj ! If you agree we could expose this version as default! And let the other running in background, after some URL tweaks |
A thought, we could even hide all the |
Could you clarify if hiding |
I honestly don't know. I think we can hide them globally in a way that those endpoints cannot be used. Or maybe I can hide them with CSS to have less clutter |
I think it is best to remove the If that's good with you, I will try to remove them. |
Ok! Go along and try to do it! Thanks again! |
…Selvaraj/pokeapi into refactor/graphql-naming
Hey @Naramsim, I have removed the
|
Hi! I deployed it here! https://graphql.pokeapi.co/v1beta2/console/ I think we are ready to update the docs and to suggest people to use the new endpoint! What do you think about the new URL? Something like: https://staging.pokeapi.co/docs/graphql |
Hey @Naramsim, I think the new URL, https://graphql.pokeapi.co/v1beta2/console/, is excellent. The graphql subdomain clearly states its purpose, and the I do have one query about the documentation at https://staging.pokeapi.co/docs/graphql. Currently, there is no direct link to v1beta1 GraphiQL interface. Even though we are planning its removal, I think it would be best to include the link until its removal, so that the user can easily navigate it. What are your thoughts on this? |
I added a link to the current console. Should be up in minutes. When we merge this then, I'll need to add a banner on the current/old console stating the deprecation. And I should also configure the GH action to update the data on the new GQL VM as well. |
I think, you should also add "Going to be deprecated" banner on the current v1beta1 GraphiQL interface. That way, users who are still there will get the message directly. |
Yes but only when we will merge the PR |
I moved the PR over here: #1264 So that I can work on it! Your commits are preserved! |
Hi @PraaneshSelvaraj I merged the PR! I made some changes afterwards but the code is now online! Many thanks for everything! |
What's Done:
Fixes: #1254